﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class admin_Order : System.Web.UI.Page
{
    DAOOrder dao_order = new DAOOrder();
    protected void Page_Load(object sender, EventArgs e)
    {
        LoadData();
    }

    private void LoadData()
    {
        gvOrder.DataSource = dao_order.GetAllOrder();
        gvOrder.DataBind();
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        String key = txtSearchOrder.Text;
        gvOrder.DataSource = dao_order.SearchOrder(key);
        gvOrder.DataBind();
    }
}